<script setup lang="ts">
import VditorPreview from 'vditor/dist/method.min.js'
import { onMounted } from 'vue'
VditorPreview.mermaidRender(document)
const { text } = defineProps(['text'])
onMounted(() => {
    new VditorPreview('#markdown-preview', {
        value: text.value,
        preview: {
            markdown: {
                render: {
                    html: true,
                    mermaid: true,
                },
            },
        },
    })
})
</script>


<template>
    <div id="markdown-preview"/>
</template>

<style>

</style>